package com.lw.algorithm.utils;

import java.util.Date;

import com.lw.algorithm.service.CalTimeService;

public class CalTimeUtils {

	public static void excute(CalTimeService calTime,int[] arr){
		//执行开始时间
		Date start = new Date();
		long startLong = start.getTime();
		
		calTime.excute(arr);
		
//		if(arr != null){
//			int printCount = arr.length;
//			if(arr.length > 1000){
//				printCount = 1000;
//			}
//			for(int i = 0;i< printCount;i++){
//				System.out.println(arr[i]);
//			}
//		}
		
		//执行结束时间
		Date end = new Date();
		long endLong = end.getTime();
		System.out.println("程序执行- " + (endLong - startLong) + " 毫秒");
		
	}
}
